package cn.mcch.investigator.presenter;

import android.content.Context;
import android.support.v4.app.FragmentManager;
import android.support.v4.view.ViewPager.OnPageChangeListener;

import cn.mcch.investigator.dialog.BaseDialog;

/**
 * Created by Administrator on 2016/12/16.
 */
public interface IMainPresenter {

    /**
     * 打开或关闭drawerlayout
     */
    void toogle();

    /**
     * 设置用户名
     *
     * @param username
     */
    void setUsername(String username);

    /**
     * 设置titlebar标题
     *
     * @param title
     */
    void setTitleBarText(String title);

    /**
     * 设置viewpager适配器
     *
     * @param fm
     */
    void setViewPagerAdapter(FragmentManager fm);

    /**
     * 退出当前用户
     *
     * @param dialog
     * @param context
     */
    void exit(BaseDialog dialog, Context context);

    /**
     * 判断drawer是否开启
     *
     * @return
     */
    boolean isDrawerpen();

    /**
     * 设置viewpager跳转到指定页面
     * @param position
     */
    void setCurrentItem(int position);
}
